Skip to content

refactor(sketch-db): merge simple_map_store into sketch_db module tree - #33

Merged
zzylol merged 1 commit into
mainfrom
sketchdb/merge-simple-map-store
Apr 18, 2026
Merged

zzylol merged 1 commit into
mainfrom
sketchdb/merge-simple-map-store

Conversation

@zzylol

@zzylol zzylol commented Apr 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Pure re-organisation. Moves src/stores/simple_map_store/src/stores/sketch_db/simple_map_store/ so the physical storage backend sits under the sketch-DB umbrella that depends on it.

  • 33 files changed, 82 lines of import-path updates, 0 logic changes.
  • crate::stores::SimpleMapStore public path stays stable — only internal stores::simple_map_store::*stores::sketch_db::simple_map_store::* absolute paths change.
  • Bulk rewrite applied via sed; each file's change is one use line.

Why

sketch_db is the logical layer (schemas, timelines, backfill); simple_map_store is one physical backend for it. Keeping them as siblings hid the dependency direction. Co-locating under one module tree makes the project identity explicit: sketch_db is the sketch DB, and simple_map_store is its current concrete storage impl.

Test plan

🤖 Generated with Claude Code

The sketch DB has two structurally-layered pieces that have been
living as sibling modules:
  - `src/stores/sketch_db/`     (logical layer: schemas, timelines, backfill)
  - `src/stores/simple_map_store/` (physical layer: per-key storage backend)

This sibling layout hid the dependency direction: `sketch_db`
depends on the `Store` trait implemented by `SimpleMapStore`, not
vice versa. The physical store is one concrete implementation of
the sketch DB's storage abstraction, not a peer concept.

Move `simple_map_store/` INTO `sketch_db/` as a submodule so the
module tree reflects the layering: everything sketch-DB-related,
including its physical backend, lives under one umbrella.

## What changed

- `git mv asap-query-engine/src/stores/simple_map_store → asap-query-engine/src/stores/sketch_db/simple_map_store`
- `stores::simple_map_store::*` → `stores::sketch_db::simple_map_store::*` across 20 files (16 backend + 1 bench + 3 internal self-references inside the moved directory).
- `stores/mod.rs` drops the `pub mod simple_map_store` declaration but keeps `pub use ... SimpleMapStore` re-export so `crate::stores::SimpleMapStore` still works for all callers.
- `sketch_db/mod.rs` adds `pub mod simple_map_store` + `pub use simple_map_store::SimpleMapStore`.

## What didn't change

- `crate::stores::SimpleMapStore` public path — callers that import via the top-level `stores::` continue to work unchanged.
- `Store` trait still lives at `stores::traits` — it's the neutral interface both the logical layer and the physical impl share.
- No code logic changed. No tests added or removed.

## Test plan

- [x] Pure rename, zero logic delta.
- [x] 647 lib tests pass (same count as PR #32).
- [x] `cargo clippy --workspace --all-targets --tests -- -D warnings` clean.
- [x] `cargo fmt -- --check` clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@zzylol
zzylol merged commit 3dbd3b0 into main Apr 18, 2026
@zzylol
zzylol deleted the sketchdb/merge-simple-map-store branch April 18, 2026 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant